-
Notifications
You must be signed in to change notification settings - Fork 25.5k
[ES|QL] Enable the TEXT_EMBEDDING function in non-snapshot build #136103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ES|QL] Enable the TEXT_EMBEDDING function in non-snapshot build #136103
Conversation
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Hi @afoucret, I've created a changelog YAML for you. |
ℹ️ Important: Docs version tagging👋 Thanks for updating the docs! Just a friendly reminder that our docs are now cumulative. This means all 9.x versions are documented on the same page and published off of the main branch, instead of creating separate pages for each minor version. We use applies_to tags to mark version-specific features and changes. Expand for a quick overviewWhen to use applies_to tags:✅ At the page level to indicate which products/deployments the content applies to (mandatory) What NOT to do:❌ Don't remove or replace information that applies to an older version 🤔 Need help?
|
bb7f79d
to
dc8bb16
Compare
dc8bb16
to
3b4fa1e
Compare
3b4fa1e
to
e958a11
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request enables the TEXT_EMBEDDING function in non-snapshot builds of Elasticsearch, moving it from development-only to general preview availability. The function generates dense vector embeddings from text using inference endpoints.
Key changes:
- Moved TEXT_EMBEDDING function from snapshot-only to general availability
- Updated function registration and capability flags
- Removed capability checks from tests and made function always available
- Enhanced documentation with additional examples and clearer descriptions
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
EsqlCapabilities.java | Removed snapshot-only restriction from TEXT_EMBEDDING_FUNCTION capability |
EsqlFunctionRegistry.java | Moved TEXT_EMBEDDING function from snapshot functions to general functions |
TextEmbedding.java | Updated function metadata and lifecycle from DEVELOPMENT to PREVIEW |
Multiple test files | Removed capability checks that were gating TEXT_EMBEDDING function tests |
Documentation files | Updated function descriptions and added new usage examples |
60_usage.yml | Added TEXT_EMBEDDING function usage tracking in REST API tests |
text-embedding.csv-spec | Updated example tags for consistency |
changelog/136103.yaml | Added changelog entry for the feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
||
@Override | ||
public void writeTo(StreamOutput out) throws IOException { | ||
public void writeTo(StreamOutput out) { |
Copilot
AI
Oct 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method signature was changed to remove the throws IOException
declaration, but StreamOutput.write*
methods can throw IOException
. This could cause compilation errors if the method implementation actually tries to write to the stream.
public void writeTo(StreamOutput out) { | |
public void writeTo(StreamOutput out) throws java.io.IOException { |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great already :)
.../src/main/java/org/elasticsearch/xpack/esql/expression/function/inference/TextEmbedding.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/esql/expression/function/inference/TextEmbedding.java
Outdated
Show resolved
Hide resolved
x-pack/plugin/esql/qa/testFixtures/src/main/resources/text-embedding.csv-spec
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once regenerate the docs :) Thanks @afoucret!
I noticed one unrelated change that should also be fixed in parameters:
- Text to generate embeddings from
+ Text string to generate embeddings from.
.../src/main/java/org/elasticsearch/xpack/esql/expression/function/inference/TextEmbedding.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/elasticsearch/xpack/esql/expression/function/inference/TextEmbedding.java
Outdated
Show resolved
Hide resolved
@leemthompo Applied most of your suggestions. |
No description provided.